﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ExamServer.Service
{
   public interface IRepositoryBase2<T,Tid>
    {
        /// <summary>
        /// 根据ID查询单个对象
        /// </summary>
        /// <param name="id">主键 ID</param>
        /// <returns></returns>
        Task<T> GetByIdAsync(Tid id);

        /// <summary>
        /// 根据ID检测是否存在该对象
        /// </summary>
        /// <param name="id">主键 ID</param>
        /// <returns></returns>
        Task<bool> IsExistAsync(Tid id);
    }
}
